<%@include file="/include/struts-tags.jsp" %>
<%-- 
    Document   : buscarReunion
    Created on : 07-07-2012, 08:44:17 PM
    Author     : Alex
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<%@include file="/include/head.jsp" %>
<script>
    function findItem(codigo){
        var form = opener.document.getElementById("reunionForm");
        form.cmd.value = "SeleccionarReunion";
        form.idReunion.value = codigo;
        form.submit();
        self.close();
    }
    
    $(document).ready(function () {
        $.datepicker.setDefaults($.datepicker.regional['es']);
    });
    
    $(function(){
        $('#datepicker').datetimepicker({
            dateFormat: 'dd/mm/yy',
            timeFormat: 'hh:mm',
            timeText: 'Hora:',
            hourText: 'horas:',
            minuteText: 'minutos:',
            secondText: 'segundos:',
            currentText: 'Hoy',
            closeText: 'Listo'
        });
    });
    
    
</script>
    <body>
        <br />
        <html:form action="/Reunion">
            <html:hidden property="cmd" value="BuscarReunion" />
            <table class="form">
                <caption class="titleSeg">B&uacute;squeda de Reuniones</caption>
                <tr class="campos">
                    <td class="label">Tema&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="tema" styleClass="tinput404" /></td>
                </tr>
                <tr class="campos">
                    <td class="label">Lugar&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="lugar" styleClass="tinput404" /></td>
                </tr>
                <tr class="campos">
                    <td class="label">Hora y Fecha&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="horafechaReunion" styleClass="tinput125" styleId="datepicker" /></td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <html:submit value="Buscar" />
                    </td>
                </tr>
            </table>
        </html:form>
        <br />
        <br />
        <logic:present name="reunionData" scope="request">
            <display:table pagesize="10" name="reunionData" requestURI="" class="results" style="width:90%;" id="results">
                <display:column property="idReunion" title="" style="text-align:center;" decorator="com.uca.sisbec.decorators.BusquedaReuDecorator" sortable="true"/>
                <display:column property="tema" title="Tema" sortable="true" />
                <display:column property="horafechaReunionStr" title="Hora y Fecha" sortable="true" />
                <display:column property="lugar" title="Lugar" sortable="true" />
            </display:table>
            <script>
                var table = document.getElementById("results");
                var rows = table.getElementsByTagName("tr");
                for (var i = 1; i < rows.length; i++) {
                    rows[i].onmouseover = function() {
                        this.className += ' hilite';
                    }
                    rows[i].onmouseout = function() {
                        this.className = this.className.replace(' hilite', '');
                    }
                }
            </script>
        </logic:present>
    </body>
</html>
